<{include file="public_html/header.html"}>
<{include file="public_html/left_menu.html"}>

<blockquote class="layui-elem-quote"><{$action}></blockquote>

<form class="layui-form layui-form-pane" method="post" action="<{$post_url}>">
	<input type="hidden" name="id" value="<{$subject_info.id|default:'0'}>" />

	<div class="layui-form-item">
		<label class="layui-form-label">科目名称</label>
		<div class="layui-input-block">
			<input type="text" name="title" value="<{$subject_info.title|default:''}>" class="layui-input" >
		</div>
	</div>

	<div class="layui-form-item">
		<label class="layui-form-label">题库分类</label>
		<div class="layui-input-block">
			<select name="tk_category_id">
				<{foreach from=$category_list item=citem}>
				<option value="<{$citem.id}>" <{if isset($subject_info.tk_category_id) AND $subject_info.tk_category_id == $citem.id}>selected<{/if}>><{$citem.name}></option>
				<{/foreach}>
			</select>
		</div>
	</div>

	<div class="layui-form-item">
		<input type="hidden" id="token" value="<{'VIMG'|get_qiniu_token}>" />
		<label class="layui-form-label">科目图标</label>
		<div class="layui-input-block">
            <div id="uploader2" class="upload_box" style="float:left; width:420px;">
                <div class="queueList">
                    <div id="dndArea2" class="placeholder dndArea">
                        <div id="filePicker2" class="filePicker"></div>
                        <p>或将照片拖到这里，最多可上传<script>document.write(fileNumLimit);</script>张图片</p>
                    </div>
                </div>
                <div class="statusBar" style="display:none;">
                    <div class="progress">
                        <span class="text">0%</span>
                        <span class="percentage"></span>
                    </div><div class="info"></div>
                    <div class="btns">
                        <div id="filePickerBut2" class="filePickerBut"></div><div class="uploadBtn">开始上传</div>
                    </div>
                </div>
                <div class="upload_img_input" input_name='img'></div>
            </div>
            <{if isset($subject_info['img']) AND $subject_info['img'] != ''}>
	  			<div class="layui-inline" style="float:left;"><img src="<{$subject_info['img']}>" style="max-height:175px;"/></div>
	  		<{/if}>
		</div>
	</div>

	<div class="layui-input-block">
		<button class="layui-btn" lay-submit lay-filter="*">立即提交</button>
		<button type="reset" class="layui-btn layui-btn-primary">重置</button>
	</div>
</form>
<{include file="public_html/footer.html"}>